<div>
  <%if is_loged_in?%>
  <div class="row">
    <div class="col-sm-4 col-md-4" style="background-color: white;height: 800px;border: 1px solid ;
						border-radius: 4px;border-color: ghostwhite;margin-right: 10px">
        <div class="row">
          <div class="col-sm-7">
            <%= gravatar_for current_user%>
          </div>

          <div class="col-sm-5 "style="padding-left: 0px">

            <h4 style="margin-top: 6px"><%= current_user.name%></h4>
            <span><%=current_user.posts.count %> 条微博 </span>
            <br>
            <span style=""><%=link_to "个人资料",current_user %></span>
          </div>
        </div>
      <br>
      <section>
        <%= render 'shared/stats'%>
      </section>
      <section>
        <%=render 'shared/post_form'%>
			 <%=render 'shared/qiniu_form'%>

			</section>
    </div>

	 <div class="col-sm-8 col-md-7 pull-right" style="background-color: white; border: 1px solid ;
					 border-radius: 4px;border-color: ghostwhite">
		 	<%if @posts.any? %>
			 	<h2>动态:  (<%= @posts.count%>)</h2>
			 	<br>
			 	<ol style="list-style: none">
					<%= render @posts%>
			 	</ol>
		 	<%end%>
		 	<span style="margin-left: 40px"><%=will_paginate @posts%></span>
		</div>

  </div>

  <%else%>
  <div style=" margin:30px 20px 10px 20px;background-color: #EFEFEF">
    <h2 style="font-size:50px;padding-top: 40px" class="text-center">Welcome to the XBLOG</h2>
    <div style="text-align: center;font-size: large;padding-bottom: 20px">加入我们,马上开始你的<%=link_to "X博客"%>之旅吧!</div>
    <button  class="btn btn-primary center-block">
      <a href="/users/new" style="color: white">
        <b style="font-size: large">注&nbsp;&nbsp;&nbsp;册!</b>
      </a>

    </button>
    <br>
  </div>
  <%end%>
</div>
